home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / BUS / TMCM Software and Labs.sit / Software for TMCM 7_95 / Files for Lab 13 / Parallel Snowflake < prev    next >
Text File  |  1995-07-07  |  775b  |  23 lines

  1. {
  2.   This program illustrates the power of multitasking 
  3.   by using repeated "fork" commands to draw a
  4.   complicated, symmetrical picture.  After the last
  5.   fork command, there are a total of 216 turtles.
  6.  
  7.   Try running this two ways:  with the "Random
  8.   Scheduling in Forks" options turned on and with
  9.   it turned off.
  10. }
  11.  
  12. fork(6)                 { Draw 6 lines radiating out }
  13. face(60*forkNumber)     { from a common center, spaced }
  14. forward(6)              { every 60 degrees. }
  15.  
  16. fork(6)                 { At the end of each of those }
  17. face(60*forkNumber+30)  { 6 lines, draw six more lines }
  18. forward(2)
  19.  
  20. fork(6)                 { And finally, at the end of each }
  21. face(60*forkNumber)     { of the 36 lines already drawn, }
  22. forward(1)              { draw another 6 lines. }
  23.